home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Interfaces & Libraries / interfaces / layout edit library.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-29  |  3.4 KB  |  138 lines  |  [TEXT/MPS ]

  1. /*
  2.   layout edit library.h
  3.   
  4.   Simple layout editing based on the TextEdit model.
  5.   
  6.   Copyright ®1992 Apple Computer, Inc. All rights reserved.
  7. */
  8.  
  9. #ifndef layoutEditLibraryIncludes
  10. #define layoutEditLibraryIncludes
  11.  
  12. #include <Types.h>
  13. #include <Memory.h>
  14.  
  15. #ifndef selectionLibraryIncludes
  16. #include "selection library.h"
  17. #endif
  18.  
  19. #ifndef layoutTypesIncludes
  20. #include "layout types.h"
  21. #endif
  22.  
  23.  
  24. typedef Handle LayoutEditHandle;
  25.  
  26. LayoutEditHandle NewLayoutEditHandle(
  27.   long textRunCount,
  28.   const short textRunLengths[],
  29.   const void *text[],
  30.   long styleRunCount,
  31.   const short styleRunLengths[],
  32.   const gxStyle styles[],
  33.   long levelRunCount,
  34.   const short levelRunLengths[],
  35.   const short levels[],
  36.   gxLayoutOptions *layoutOptions,
  37.   gxPoint *position,
  38.   gxStyle defaultStyle);
  39.  
  40. LayoutEditHandle LayoutEditHandleFromLayout(gxShape layout);
  41.  
  42. long GetLayoutEditHandle(
  43.   LayoutEditHandle handle,
  44.   void *text,
  45.   long *styleRunCount,
  46.   short styleRunLengths[],
  47.   gxStyle styles[],
  48.   long *levelRunCount,
  49.   short levelRunLengths[],
  50.   short levels[],
  51.   gxLayoutOptions *layoutOptions,
  52.   gxPoint *position);
  53.  
  54. void SetLayoutEditHandle(
  55.   LayoutEditHandle handle,
  56.   long textRunCount,
  57.   const short textRunLengths[],
  58.   const void *text[],
  59.   long styleRunCount,
  60.   const short styleRunLengths[],
  61.   const gxStyle styles[],
  62.   long levelRunCount,
  63.   const short levelRunLengths[],
  64.   const short levels[],
  65.   const gxLayoutOptions *layoutOptions,
  66.   const gxPoint *position);
  67.  
  68. void SetLayoutEditHandleParts(
  69.   LayoutEditHandle handle,
  70.   gxByteOffset oldStartOffset,
  71.   gxByteOffset oldEndOffset,
  72.   long newTextRunCount,
  73.   const short newTextRunLengths[],
  74.   const void *newText[],
  75.   long newStyleRunCount,
  76.   const short newStyleRunLengths[],
  77.   const gxStyle newStyles[],
  78.   long newLevelRunCount,
  79.   const short newLevelRunLengths[],
  80.   const short newLevels[]);
  81.  
  82. void SetLayoutEditHandleShapeParts(
  83.   LayoutEditHandle handle,
  84.   gxByteOffset startOffset,
  85.   gxByteOffset endOffset,
  86.   gxShape insert);
  87.  
  88. long GetLayoutEditHandleParts(
  89.   LayoutEditHandle handle,
  90.   gxByteOffset startOffset,
  91.   gxByteOffset endOffset,
  92.   void *text,
  93.   long *styleRunCount,
  94.   short styleRunLengths[],
  95.   gxStyle styles[],
  96.   long *levelRunCount,
  97.   short levelRunLengths[],
  98.   short levels[]);
  99.  
  100. gxShape GetLayoutEditHandleShapeParts(
  101.   LayoutEditHandle handle,
  102.   gxByteOffset startOffset,
  103.   gxByteOffset endOffset,
  104.   gxShape dest);
  105.  
  106. void LayoutEditIdle(LayoutEditHandle handle);
  107.  
  108. void LayoutEditClick(LayoutEditHandle handle, gxPoint hitDown);
  109.  
  110. void LayoutEditActivate(LayoutEditHandle handle);
  111.  
  112. void LayoutEditDeactivate(LayoutEditHandle handle);
  113.  
  114. void LayoutEditKey(LayoutEditHandle handle, char key);
  115.  
  116. void LayoutEditUpdate(LayoutEditHandle handle);
  117.  
  118. SelectionHandle LayoutEditGetSelection(LayoutEditHandle handle);
  119.  
  120. void LayoutEditSetSelection(LayoutEditHandle handle, SelectionHandle selection);
  121.  
  122. void LayoutEditSetStyle(LayoutEditHandle handle, gxStyle newStyle);
  123. void LayoutEditIncrementLevel(LayoutEditHandle handle);
  124. void LayoutEditDecrementLevel(LayoutEditHandle handle);
  125. void LayoutEditSetLevel(LayoutEditHandle handle, long level);
  126.  
  127. void LayoutEditCut(LayoutEditHandle handle);
  128. void LayoutEditCopy(LayoutEditHandle handle);
  129. void LayoutEditPaste(LayoutEditHandle handle);
  130. void LayoutEditClear(LayoutEditHandle handle);
  131.  
  132. void LayoutEditFromScrap(LayoutEditHandle handle);
  133. void LayoutEditToScrap(LayoutEditHandle handle);
  134.  
  135. void DisposeLayoutEditHandle(LayoutEditHandle handle);
  136.  
  137. #endif
  138.